package com.atguigu.jxc.pay;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@Slf4j
public class Allpay {
    @Autowired
    private Map<String,Pay> pay;

    public Pay method(String str){
        Pay pay1 = pay.get(str);
        if (pay1 == null){
             log.error("不存在");
            return null;
        }
        return pay1;
    }
}

